#ifndef AED_ENTITY_H
#define AED_ENTITY_H

#include "aed_archtype.h"
#include <QTextStream>
#include <QDomDocument>

class AED_Entity
{
    AED_Archtype *m_arch;

    bool m_selected;
public:
    double m_pos_x;
    double m_pos_y;
    double m_rot;
    double m_size;

    double o_pos_x;
    double o_pos_y;
    double o_rot;
    double o_size;
    double o_alpha;

    AED_Entity();
    AED_Entity(AED_Archtype *arch);

    AED_Entity(const AED_Entity &ent);
    AED_Entity & operator=(const AED_Entity &ent);

    void SetArchtype(AED_Archtype *arch);
    AED_Archtype* GetArchtype();

    void Save(QTextStream &file);
    void Save(QDomDocument &doc, QDomElement &header);

    bool IsSelected()const{return m_selected;}
    void SetSelected(bool sel){m_selected=sel;}
};

#endif // AED_ENTITY_H
